package com.alt.www.sort;

/**
 * Created by 27340 on 2017/9/16.
 */
public class MergeSelf {
    private static Comparable[] aux;

    public static void sort(Comparable[] a){
        aux = new Comparable[a.length];
        sort(a, 0, a.length-1);
    }

    private static void sort(Comparable[] a, int lo, int hi){
        if(hi<=lo)return;
        int mid = lo + (hi-lo)/2;
        sort(a, lo, mid);
        sort(a, mid+1, hi);
        MergeSort.sort(a, lo, mid, hi);
    }
}
